home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 2001 May / SGI Freeware 2001 May - Disc 1.iso / dist / fw_qt.idb / usr / freeware / include / qfontdialog.h.z / qfontdialog.h
C/C++ Source or Header  |  2001-04-12  |  4KB  |  139 lines

  1. /****************************************************************************
  2. ** $Id: qt/src/dialogs/qfontdialog.h   2.3.0   edited 2001-01-26 $
  3. **
  4. ** Definition of QFontDialog
  5. **
  6. ** Created : 970605
  7. **
  8. ** Copyright (C) 1992-2000 Trolltech AS.  All rights reserved.
  9. **
  10. ** This file is part of the dialogs module of the Qt GUI Toolkit.
  11. **
  12. ** This file may be distributed under the terms of the Q Public License
  13. ** as defined by Trolltech AS of Norway and appearing in the file
  14. ** LICENSE.QPL included in the packaging of this file.
  15. **
  16. ** This file may be distributed and/or modified under the terms of the
  17. ** GNU General Public License version 2 as published by the Free Software
  18. ** Foundation and appearing in the file LICENSE.GPL included in the
  19. ** packaging of this file.
  20. **
  21. ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
  22. ** licenses may use this file in accordance with the Qt Commercial License
  23. ** Agreement provided with the Software.
  24. **
  25. ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
  26. ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  27. **
  28. ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
  29. **   information about Qt Commercial License Agreements.
  30. ** See http://www.trolltech.com/qpl/ for QPL licensing information.
  31. ** See http://www.trolltech.com/gpl/ for GPL licensing information.
  32. **
  33. ** Contact info@trolltech.com if any conditions of this licensing are
  34. ** not clear to you.
  35. **
  36. **********************************************************************/
  37.  
  38. #ifndef QFONTDIALOG_H
  39. #define QFONTDIALOG_H
  40.  
  41. #include "qwindowdefs.h"
  42.  
  43. #ifndef QT_NO_FONTDIALOG
  44.  
  45. //
  46. //  W A R N I N G
  47. //  -------------
  48. //
  49. //  This class is under development and has private constructors.
  50. //
  51. //  You may use the public static getFont() functions which are guaranteed
  52. //  to be available in the future.
  53. //
  54.  
  55. #ifndef QT_H
  56. #include "qdialog.h"
  57. #include "qfont.h"
  58. #endif // QT_H
  59.  
  60. class  QListBox;
  61. class  QComboBox;
  62. class QFontDialogPrivate;
  63.  
  64.  
  65. class Q_EXPORT QFontDialog: public QDialog
  66. {
  67.     Q_OBJECT
  68.  
  69. public:
  70.     static QFont getFont( bool *ok, const QFont &def,
  71.                   QWidget *parent = 0, const char* name = 0);
  72.  
  73.     static QFont getFont( bool *ok, QWidget *parent = 0, const char* name = 0);
  74.  
  75. private:
  76.     QFontDialog( QWidget *parent=0, const char *name=0, bool modal=FALSE,
  77.          WFlags f=0 );
  78.    ~QFontDialog();
  79.  
  80.     QFont font() const;
  81.     void setFont( const QFont &font );
  82.  
  83. signals:
  84.     void fontSelected( const QFont &font );
  85.     void fontHighlighted( const QFont &font );
  86.  
  87. protected:
  88.     bool eventFilter( QObject *, QEvent * );
  89.  
  90.     QListBox * familyListBox() const;
  91.     virtual void updateFamilies();
  92.  
  93.     QListBox * styleListBox() const;
  94.     virtual void updateStyles();
  95.  
  96.     QListBox * sizeListBox() const;
  97.     virtual void updateSizes();
  98.  
  99.     QComboBox * scriptCombo() const;
  100.     virtual void updateScripts();
  101.  
  102. #if 0
  103.     QString family() const;
  104.     QString script() const;
  105.     QString style() const;
  106.     QString size() const;
  107. #endif
  108.  
  109. protected slots:
  110.     void sizeChanged( const QString &);
  111.  
  112. private slots:
  113.     void familyHighlighted( const QString &);
  114.     void familyHighlighted( int );
  115.     void scriptHighlighted( const QString &);
  116.     void scriptHighlighted( int );
  117.     void styleHighlighted( const QString &);
  118.     void sizeHighlighted( const QString &);
  119.     void updateSample();
  120.     void emitSelectedFont();
  121.  
  122. private:
  123.     static QFont getFont( bool *ok, const QFont *def,
  124.               QWidget *parent = 0, const char* name = 0);
  125.  
  126.     QFontDialogPrivate * d;
  127.     friend class QFontDialogPrivate;
  128.  
  129. private:    // Disabled copy constructor and operator=
  130. #if defined(Q_DISABLE_COPY)
  131.     QFontDialog( const QFontDialog & );
  132.     QFontDialog& operator=( const QFontDialog & );
  133. #endif
  134. };
  135.  
  136. #endif
  137.  
  138. #endif // QFONTDIALOG_H
  139.